﻿#include "TcpClient.h"

#ifdef _WIN32

const char* TcpClient::IP() const
{
    return inet_ntoa(clientAddr.sin_addr);
}

unsigned int TcpClient::Port() const
{
    return clientAddr.sin_port;
}

void TcpClient::Close()
{
    closesocket(sock);
}


#endif

#ifdef __linux__
const char *TcpClient::IP() const
{
    return inet_ntoa(clientAddr.sin_addr);
}

unsigned int TcpClient::Port() const
{
    return clientAddr.sin_port;
}

void TcpClient::Close()
{
    close(sock);
}
#endif // DEBUG

